﻿using System;

namespace HslCommunication.MQTT
{
	/// <summary>
	/// Mqtt发送的消息封装对象，是对 <see cref="T:HslCommunication.MQTT.MqttApplicationMessage" /> 对象的封装，添加了序号，还有是否重发的信息<br />
	/// The message encapsulation object sent by Mqtt is an encapsulation of the <see cref="T:HslCommunication.MQTT.MqttApplicationMessage" /> object, with the serial number added, and whether to retransmit
	/// </summary>
	// Token: 0x020000C4 RID: 196
	public class MqttPublishMessage
	{
		/// <summary>
		/// 实例化一个默认的对象<br />
		/// Instantiate a default object
		/// </summary>
		// Token: 0x06000E6F RID: 3695 RVA: 0x000551C0 File Offset: 0x000533C0
		public MqttPublishMessage()
		{
			this.IsSendFirstTime = true;
		}

		/// <summary>
		/// 是否第一次发送数据信息<br />
		/// Whether to send data information for the first time
		/// </summary>
		// Token: 0x1700021D RID: 541
		// (get) Token: 0x06000E70 RID: 3696 RVA: 0x000551D2 File Offset: 0x000533D2
		// (set) Token: 0x06000E71 RID: 3697 RVA: 0x000551DA File Offset: 0x000533DA
		public bool IsSendFirstTime { get; set; }

		/// <summary>
		/// 当前的消息的标识符，当质量等级为0的时候，不需要重发以及考虑标识情况<br />
		/// The identifier of the current message, when the quality level is 0, do not need to retransmit and consider the identification situation
		/// </summary>
		// Token: 0x1700021E RID: 542
		// (get) Token: 0x06000E72 RID: 3698 RVA: 0x000551E3 File Offset: 0x000533E3
		// (set) Token: 0x06000E73 RID: 3699 RVA: 0x000551EB File Offset: 0x000533EB
		public int Identifier { get; set; }

		/// <summary>
		/// 当前发布消息携带的mqtt的应用消息，包含主题，消息等级，负载。<br />
		/// The application message of mqtt carried in the current published message, including the subject, message level, and load.
		/// </summary>
		// Token: 0x1700021F RID: 543
		// (get) Token: 0x06000E74 RID: 3700 RVA: 0x000551F4 File Offset: 0x000533F4
		// (set) Token: 0x06000E75 RID: 3701 RVA: 0x000551FC File Offset: 0x000533FC
		public MqttApplicationMessage Message { get; set; }
	}
}
